$(function(){

});

function save() {
	$.ajax({
		url : $WEB_ROOT_PATH + "/user/add.do",
		type : "post",
		dataType : "json",
		data : $('#userForm').serialize(),
		error : function(e) {

		},
		success : function(result) {
			alert(result.msg);
			if (result.status == 0) {
				window.location.href = $WEB_ROOT_PATH + "/user/query.do";
			}
		}
	});
}

function update() {
	$.ajax({
		url : $WEB_ROOT_PATH + "/user/update.do",
		type : "post",
		dataType : "json",
		data : $('#userForm').serialize(),
		error : function(e) {

		},
		success : function(result) {
			alert(result.msg);
			if (result.status == 0) {
				window.location.href = $WEB_ROOT_PATH + "/user/query.do";
			}
		}
	});
}

function go_back() {
	window.history.go(-1);
}